package com.dsjy.yf.address.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsjy.yf.address.entity.dataobject.BuildingDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-15 9:43
 */
public interface BuildingMapper extends BaseMapper<BuildingDO> {

    /**
     * 根据区划代码查找建筑物信息
     *
     * @param parentCode
     * @return
     */
    List<BuildingDO> searchBuildingWithCode(Integer parentCode, Boolean flag);

    /**
     * 增加建筑物
     *
     * @param buildingDO
     * @return
     */
    Integer addBuilding(@Param("buildingDO") BuildingDO buildingDO);


    /**
     * 修改更新
     *
     * @param buildingDO
     * @return
     */
    Integer updBuilding(@Param("buildingDO") BuildingDO buildingDO);
}
